<p-dialog #loginDialog 
[header]='isLogin?"Login":"Register"' 
[(visible)]="visible"
[modal]="true" 
[dismissableMask]="true"
[closable]="true" 
[focusOnShow]="false" 
[maximizable]="false" 
[draggable]="false" 
[resizable]="false" 
>

  <app-login-form #loginForm *ngIf="isLogin"
    (onRegistration)="registration()"
    (onLoginOk)="hideDialog()">
  </app-login-form>
  
  <app-register-form #registerForm *ngIf="isRegistration"
    (onRegistrationOk)="hideDialog()">
  </app-register-form>

  <p-footer>
    <p-button type="submit" [icon]="icon" [label]="label" [disabled]="disabled" (click)="submit()"></p-button>
  </p-footer>
</p-dialog>

